#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int main()
{
	int cou=0;
	char ch;
	char s[10000];
	gets(s);
    int a[1000],i,j,k,ln=strlen(s);
    for(j=k=i=0;i<ln;i++){
        sscanf(s+i,"%d%n",&a[j],&k);
        if(k)
		j++;
        i+=k;
        k=0;
    }
    printf("%d",j);
    return 0;
}
